package cn.csc.module.order.convert.shopcart;

import cn.csc.framework.common.pojo.PageResult;
import cn.csc.module.order.controller.app.shopcart.vo.*;
import cn.csc.module.order.dal.dataobject.shopcart.ShopCartItemDO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 购物车 Convert
 *
 * @author liuchuang
 */
@Mapper
public interface ShopCartItemConvert {

    ShopCartItemConvert INSTANCE = Mappers.getMapper(ShopCartItemConvert.class);

    ShopCartItemDO convert(AppShopCartItemCreateReqVO bean);

    ShopCartItemDO convert(AppShopCartItemUpdateReqVO bean);

    AppShopCartItemRespVO convert(ShopCartItemDO bean);

    List<AppShopCartItemRespVO> convertList(List<ShopCartItemDO> list);

    PageResult<AppShopCartItemRespVO> convertPage(PageResult<ShopCartItemDO> page);

    List<AppShopCartItemExcelVO> convertList02(List<ShopCartItemDO> list);

    AppShopCartListRespVO convert02(ShopCartItemDO bean);

    AppShopCartItemCreateReqVO convert01(AppShopCartItemUpdateReqVO bean);

    ShopCartItemDO convert(AppShopCartItemDeleteReqVO bean);
}
